Other forms: blessings in disguise
A blessing in disguise is something undesirable that ends up having unexpected good results. Spraining your wrist is painful and unpleasant, but if it gets you out of weeding the garden, it may be a blessing in disguise!
A disguise is something that hides the true nature of a person or thing, and a blessing is something very good or fortunate. So at first you might see an event as negative, but you discover its true nature as a blessing when a good result removes the "disguise." People have been using this expression for almost 300 years. It is thought to have been first used by a writer named James Hervey in a religious song about accepting difficult circumstances.